﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace K9Nano.GlobalOptions;

public static class RegexPatterns
{
    public const string Phone = @"^1[3456789]\d{9}$";

    public const string Email = @"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$";

    /// <summary>
    /// 中文、英文、数字、下划线
    /// </summary>
    public const string ChEnDigitUnderline = @"[\u4e00-\u9fa5_a-zA-Z0-9_]+";

    public const string ChEnDigitUnderlineError = "请输入中文、英文、数字或者下划线";

    /// <summary>
    /// 英文、数字、下划线、中划线
    /// </summary>
    public const string EnDigitUnderline = @"[a-zA-Z0-9_\-]+";

    public const string EnDigitUnderlineError = "请输入英文、数字、下划线或者中划线";

    /// <summary>
    /// 整数或者小数
    /// </summary>
    public const string Numerical = @"^(\-|\+)?\d+(\.\d+)?$";

    public const string NumericalError = "请输入数值";

    public const string EnDigitDot = @"[a-zA-Z0-9\.]+";
}
